<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    var xhr = new XMLHttpRequest();
    console.log(xhr.UNSENT);            // 对应状态值0
    console.log(xhr.OPENED);            // 对应状态值1
    console.log(xhr.HEADERS_RECEIVED);  // 对应状态值2
    console.log(xhr.LOADING);           // 对应状态值3
    console.log(xhr.DONE);              // 对应状态值4
  </script>
</body>
</html>